package com.eliza.music.model.vm

import androidx.lifecycle.ViewModel
import com.eliza.music.model.entity.BasicInfo
import com.eliza.music.model.entity.Category
import com.eliza.music.model.tmp.DataCategory
import com.eliza.music.model.tmp.PlaylistListBig
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import javax.inject.Inject


class VmRecommend @Inject constructor() : ViewModel() {
    private var _categoryList = MutableStateFlow(listOf<Category<BasicInfo>>())
    val categoryList: StateFlow<List<Category<BasicInfo>>> = _categoryList


    init {
        InitFromNet()
    }

    fun InitFromNet() {
        _categoryList.value =
            listOf(DataCategory(PlaylistListBig.subList(0, PlaylistListBig.size / 2)))
    }
}
